<template>
  <div class="success-container">
    <div class="message-box">
      <img
        src="../../assets/img/success.png"
        alt="发布成功"
        draggable="false"
      />
      <span>文章发布成功</span>
      <el-button type="primary" @click="goHome">返回主页</el-button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    goHome() {
      this.$router.push("/"); // 假设主页的路由路径为 '/'
    },
  },
};
</script>

<style lang="less" scoped>
.success-container {
  display: flex;
  margin-top: 100px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .message-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    img {
      user-select: none;
    }
    span {
      font-size: 24px;
      font-weight: bold;
    }
  }
}
</style>
